package com.abhinav.designPatterns.iterator;

import java.util.List;

public class ConcreteChannelIterator implements ChannelIterator {
	private List<String> channels;
	private int currentPos = 0;

	public ConcreteChannelIterator(List<String> channels) {
		this.channels = channels;
	}

	@Override
	public boolean hasNext() {
		if(currentPos + 1 < channels.size()){
			return true;
		}
		return false;
	}

	@Override
	public void next() {
		currentPos++;
	}

	@Override
	public String currentItem() {
		return channels.get(currentPos);
	}

}
